using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FlyEffect : Effect
{
    public static Quaternion quaternion = Quaternion.Euler(90, 90, -90);
    private void Awake()
    {
        pSystem=GetComponent<ParticleSystem>();
        Play();
    }
    public override void Play()
    {
        pSystem.Play();
        StartCoroutine(DestroyMyObject());
    }

    protected override IEnumerator DestroyMyObject()
    {
        yield return new WaitForSeconds(destroyTime);
        ObjectPool.Instance.push(gameObject);
    }
}
